local utils = {}

utils.unrequire = function(m)
	package.loaded[m] = nil
	_G[m] = nil
end

utils.overrideTimerPerformWithDelay = function()
	timer.oldPerformWithDelay = timer.performWithDelay

	timer.performWithDelay = function(interval, func, ...)
		local iterations, params
		local options = {...}
		if type(options[1]) == "number" then
			iterations = options[1]
			params = options[2]
		else
			iterations = 1
			params = options[1]
		end
		local function doIt()
			func(params)
		end
		return timer.oldPerformWithDelay(interval, doIt, iterations)
	end
end

return utils